<!--
 * @Author: Wang WeiHao
 * @Date: 2024-04-15 15:40:49
 * @LastEditors: Wang WeiHao
 * @LastEditTime: 2024-05-07 11:21:48
 * @Description: 地下水综合生产能力
 * @FilePath: \hmcs_map\src\views\spone\frontPage\jin\jin3.vue
-->
<template>
  <div class="w-100 h-100">
    <div class="d-flex justify-content-end w-100 h-10">
    </div>
    <div class="w-100 h-90">
      <div
        v-for="(item, index) in list"
        class="w-100 item d-flex justify-content-between mt-2"
        :style="{ backgroundImage: 'url(' + item.img + ')' }"
      >
        <div class="title">{{ item.title }}</div>
        <div class="d-flex">
          <div
            style="text-shadow: 0px 0px 10px #b8eb8f"
            :style="{ color: item.textColor }"
          >
            {{ data[index] }}万
          </div>
          <div>立方米/年</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">

import img1 from "@/assets/image/underGround/dxs1.png";
import img2 from "@/assets/image/underGround/dxs2.png";
import img3 from "@/assets/image/underGround/dxs3.png";
const list = [
  {
    img: img2,
    title: "土壤滤渗净化",
    textColor: "rgba(27, 251, 250, 1)",
  },
  {
    img: img3,
    title: "人工湿地净化",
    textColor: "#fff",
  },
  {
    img: img1,
    title: "过滤地",
    textColor: "rgba(184, 235, 143, 1)",
  },
];
const data:any = ref([]);

const props = defineProps({
  selectValue: {
    type: Number,
    default: 2023,
  },
  echartsData: {
    type: Array,
    default: () => [],
  },
});
const current = computed(() => {
  
  let data:any = [];
  try {
    data = props.echartsData[props.selectValue];
  } catch (error) {}

  return data;
});

watch(
  () => current.value,
  (val) => {
    
    if (val) {
   data.value=val
    }
  }
);
onMounted(() => {
console.log( props.echartsData,'= props.echartsData');
data.value=props.echartsData[props.selectValue]

});
</script>

<style lang="less" scoped>
.item {
  height: 24.5%;
  background-size: 100% 100%;
  padding: 30px 20px 10px 100px;
  font-size: 24px;
  font-family: "OPPOSans-Regular";
}
.title {
}
</style>
